% output : matrix of thresholds.

% There is one column per feature.
% Each column is a list of thresholds, evenly spaced, between the highest
% and lowest value found in the training set.

% Note : the training data might not have the same max and min. But this
% should still work.

% TODO : use buckets on a fraction of the examples.

function thresholds = findThresholdsBuckets(DataSet)
   disp(sprintf('Number of thresholds : %d', DataSet.numThresholds));
   thresholds = zeros(DataSet.numThresholds, DataSet.numFeatures);
   for feat=1:DataSet.numFeatures
      x = DataSet.x(:,feat);
      for t=1:DataSet.numThresholds
        thresholds(t,feat) = percentile(x,t/(DataSet.numThresholds+1));          
      end
   end
end